'''
Created on 15/02/2011

@author: Vinicius
'''
from numpy import matrix
from radialBasisFunctions import rbf 
from funcoes import define_input
from scipy.cluster.vq import kmeans2, whiten

t1 = matrix([1,1])
t2 = matrix([0,0])
centers = [t1,t2]
input = matrix([[1,1], [0,1], [0,0] , [1,0]])
d = matrix([0,1,0,1])

result = define_input('iris.data')
input = result[0]

for i in range(len(result[1])):
    if result[1][i] == 'Iris-setosa':
        result[1][i] = 1
    else: 
        result[1][i] = 0

input = whiten(input)
clustering = kmeans2(input,2)
output = matrix(result[1])
centers = clustering[0] 

'Main'
print (matrix(rbf(input,output,centers))).T
